import React, { Children } from "react"
import goodsShop from "../component/goodsshop/goodsShop"
let Home = React.lazy(() => import("../component/home/Home"))
let Present = React.lazy(() => import("../component/present/Present"))
let Category = React.lazy(() => import("../component/category/Category"))
let Cart = React.lazy(() => import("../component/cart/Cart"))
let My = React.lazy(() => import("../component/my/My"))
let YgCategory = React.lazy(() => import("../component/common/yt-catagory/YgCategory"))
let GoodsDetails = React.lazy(() => import("../component/goodsdetails/goodsdeatails"))
let Buy = React.lazy(() => import("../component/goodsdetails/buy/buy"))
let GoodsShop = React.lazy(() => import("../component/goodsshop/goodsShop"))
let OrderDetail = React.lazy(()=>import("../component/orderdetail/OrderDetail"))

let routes = [
    {
        path: "/",
        component: Home,
        exact: true
    },
    {
        path: "/present",
        component: Present
    },
    {
        path: "/category",
        component: Category
    },
    {
        path: "/cart",
        component: Cart
    },
    {
        path: "/my",
        component: My
    },
    {
        path: "/ytcatagory",
        component: YgCategory
    },
    {
        path: "/goodsshop",
        component: GoodsShop
    },

    {
        path: "/goodsdetails",
        component: GoodsDetails,
        routes: [
            {
                path: "/goodsdetails/buy",
                component: Buy,
            }
        ]
    },
    {
        path: "/orderdetail",
        component: OrderDetail

    }
]
export default routes;